package com.erp.common.exception;

import com.erp.common.enums.ResponseCode;
import lombok.Data;

@Data
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = -5748952419677491769L;

    /**
     * 业务状态码
     */

    Integer code = ResponseCode.BUSINESS_ERROR.getCode();

    String message;

    public BaseException(String message) {
        super(message);
        this.message = message;
    }

    public BaseException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public BaseException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.message = message;
    }
}
